@layout("/common/_curd/_container.html"){

<script type="text/javascript">
	var ctx = "${basePath}";
	var grid_selector = "#grid-table";
	var pager_selector = "#grid-pager";
	
	$(function(){
		initGrid();
//		initMenuBtn("btns", "${code}");
	});
	
	function initGrid(){
		var grid_url = ctx + "/${code}/list";
        var _colnames = ["ID",
            "标题",
            "发送人",
            "发送时间"
        ];
        var _colmodel = [{name:"id", index:"id", width:100,hidden:true},
            {name:"title", index:"title", width:100},
            {name:"cname", index:"cname", width:100},
            {name:"ctime", index:"ctime", width:100}
        ];

		jQuery(grid_selector).jqGrid({
			url : grid_url,
		    shrinkToFit : true,
			colNames : _colnames,
			colModel : _colmodel,
			jsonReader : {id :"id"},
            multiselect: false,//checkbox多选
            pager : pager_selector,
			postData : {sort : "id", order : "desc"}
		});
	}
</script>


	<!-- 配置 grid -->
	<div class="row">
		<div class="col-xs-12 tb-grid">
			<!-- 配置 查询 -->
            @ var _col=[
            @		{name:"标题", index:"title", type:"text"},
            @		{name:"通知发起人", index:"cname", type:"text"},
            @		{name:"发布时间(大于)",index:"ctime_gt", type:"date",placeholder:"发布时间(大于)",format:"YYYY-MM-DD"},
            @		{name:"发布时间(小于)",index:"ctime_lt", type:"date",placeholder:"发布时间(小于)",format:"YYYY-MM-DD"}
            @];
            @ include("/common/_function/_search2.html",{"col":_col}){}
			<!-- 按钮 
			<div class="welljq well-sm" id="btns"></div>-->
			<!-- grid -->
			<table id="grid-table"></table>
			<!-- 分页-->
			<div id="grid-pager"></div>
		</div>
	</div>
	
	<!-- 引入所需的js -->
	@include("/common/_listscript.html"){}
	
@}	